<template>
  <div class="big">
    <div>
      <!--导航栏-->
      <NavigationBar></NavigationBar>
      <!--内容-->
      <div>
        <div class="secon">商品信息管理&emsp;/&emsp;<b>商品信息</b></div>
        <div class="cont">
          <div class="conta">
            <!--            -->
            <div class="list">
              <div class="lista">名称<el-input v-model="input" placeholder="请输入" class="inp"></el-input></div>
              <div class="lista">类别<el-input v-model="input" placeholder="请输入" class="inp"></el-input></div>
              <div class="but lista"><el-button type="warning">查询 <i class="el-icon-search"></i></el-button></div>
            </div>
            <!--            -->
            <div class="listb">
              <el-button type="warning" @click="Information"><i class="el-icon-plus"></i> 新增</el-button>
              <el-button type="danger"><i class="el-icon-delete"></i> 删除</el-button>
            </div>
            <!--            -->
            <div class="listc">
              <div class="listca listca0"><el-checkbox></el-checkbox></div>
              <div class="listca listca1">ID</div>
              <div class="listca listca2">编号</div>
              <div class="listca listca3">名称</div>
              <div class="listca listca4">类别</div>
              <div class="listca listca5">规格</div>
              <div class="listca listca6">图片</div>
              <div class="listca listca7">介绍</div>
              <div class="listca listca8">价格</div>
              <div class="listca listca9">单限</div>
              <div class="listca listca10">库存</div>
              <div class="listca listca11">操作</div>
            </div>
            <div class="liste" v-for="item in 5" :key="item">
              <div class="listea listca0"><el-checkbox></el-checkbox></div>
              <div class="listea listca1">{{ item }}</div>
              <div class="listea listca2">111123</div>
              <div class="listea listca3">aa</div>
              <div class="listea listca4">a</div>
              <div class="listea listca5">500/kg</div>
              <div class="listea listca6"><img src="https://t7.baidu.com/it/u=1699747003,4225413511&fm=193&f=GIF" class="imga" alt=""></div>
              <div class="listea listca7">难喝的要死</div>
              <div class="listea listca8">999</div>
              <div class="listea listca9">2</div>
              <div class="listea listca10">50</div>
              <div class="listea listca11">
                <div class="buta">
                  <el-button type="success"><i class="el-icon-document"></i> 详情</el-button>
                  <el-button type="success" @click="stock"><i class="el-icon-house"></i> 库存</el-button>
                  <el-button type="success"><i class="el-icon-edit"></i> 修改</el-button>
                </div>
                <div class="butb">
                  <el-button type="warning"><i class="el-icon-search"></i> 查看评论</el-button>
                  <el-button type="danger"><i class="el-icon-delete"></i> 删除</el-button>
                </div>
              </div>
            </div>
            <div class="listf">
              <el-pagination :page-size="10" layout="total, prev, pager, next, jumper" :total="40"></el-pagination>
            </div>
            <!--            -->
          </div>
        </div>
      </div>

    </div>
  </div>
</template>

<script>
import NavigationBar from "../../../components/NavigationBar";

export default {
  // 组件封装
  components: {
    'NavigationBar': NavigationBar
  },
  data(){
    return{
      input: "",
      activeIndex: 'information',
    }
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
    Information(){
      this.$router.push('/information_add')
    },
    stock(){
      this.$router.push('/inventory_stock')
    }
  }
}
</script>

<style scoped>
.big{
  background-color: #F7F8FA;
  height: 100%;
  width: 100%;
}

.secon{
  text-align: center;
  background-color: #ffffff;
  margin: 10px 20px;
  height: 40px;
  line-height: 40px;
}
.cont{
  background-color: #ffffff;
  margin: 10px 20px;
  height: 100%;
}
.inp{
  width: 300px;
  padding-left: 20px;
}
.list{
  padding-bottom: 20px;
  padding-top: 30px;
  display: flex;
  justify-content: center;
}
.lista{
  padding-left:20px;
}
.listb{
  padding: 10px 30px;
}
.listc{
  display: flex;
  justify-content: space-between;
  border: 1px solid #ccc;
  margin: 0 30px
}
.listca{
  height: 50px;
  border: 1px solid #ccc;
  text-align: center;
  line-height: 50px;
}
.listca0{
  width: 2%;
}
.listca1{
  width: 5%;
}
.listca2{
  width: 10%;
}
.listca3{
  width: 10%;
}
.listca4{
  width: 8%;
}
.listca5{
  width: 10%;
}
.listca6{
  width: 8%;
}
.listca7{
  width: 12%;
}
.listca8{
  width: 8%;
}
.listca9{
  width: 8%;
}
.listca10{
  width: 8%;
}
.listca11{
  width: 16%;
}
.imga{
  width: 100px;
  height: 100px;
  padding-top: 40px;
}

.liste{
  display: flex;
  justify-content: space-between;
  border: 1px solid #ccc;
  margin: 0 30px
}
.listea{
  height: 180px;
  border: 1px solid #ccc;
  text-align: center;
  line-height: 180px;
}
.listf{
  text-align: center;
}
.buta{
  margin-top: -20px;
  height: 100px;
}
.butb{
  margin-top: -50px;
  height: 1px;
}







</style>
